import request from '@/utils/request'


export function getTaskList(data) {
  return request({
    url: '/task/list',
    method: 'post',
    data
  })
}

export function createTask(data) {
  return request({
    url: '/task/create',
    method: 'post',
    data
  })
}

export function updateTask(data) {
  return request({
    url: '/task/update',
    method: 'post',
    data
  })
}

export function runTask(data) {
  return request({
    url: '/task/run',
    method: 'post',
    data
  })
}

export function deleteTask(data) {
  return request({
    url: '/task/remove',
    method: 'post',
    data
  })
}

export function disableTask(data) {
  return request({
    url: '/task/disable',
    method: 'post',
    data
  })
}

export function activeTask(data) {
  return request({
    url: '/task/active',
    method: 'post',
    data
  })
}
